package com.siqi.hr.system.common.utils;

import com.siqi.hr.system.custom.entity.SelectBox;

import java.util.List;

/**
 * 处理下拉、下拉多选类型字段工具类
 * @author     xiaogq
 * Created by xiaogoingqin on 2016/9/14
 */
public class SelectBoxUtils {

    /**
     * 处理下拉框多选id值替换成名称
     * @param selBoxs
     * @return
     */
    public static String setNameReplaceId(List<SelectBox> selBoxs){
        String boxName = "";
        if(selBoxs != null && selBoxs.size() > 0){
            for(SelectBox box : selBoxs){
                boxName += box.getName()+",";
            }
            boxName = boxName.substring(0,boxName.lastIndexOf(","));
        }
        return boxName;
    }

}
